fix(install): warn when shelltime-daemon is missing from archive#10
Conversation
Previously the script silently skipped the daemon move when shelltime-daemon was absent from the extracted tarball, leaving Linux users without a working daemon and no signal that anything went wrong. Now print a clear stderr warning pointing out that the CLI will attempt to auto-download the daemon on first `shelltime daemon install`. Keep the script non-fatal so the rest of the install (hooks, PATH, daemon dir) still completes. https://claude.ai/code/session_01ThKSJA9sGXQm8jMeCZZdYY
Code ReviewOverviewThis PR adds a stderr warning when What's Good
Suggestions1. Minor style:
- echo "" >&2
+ echo >&22. Consider collapsing to a single Five else
printf '\nWARNING: shelltime-daemon binary was NOT found in %s.\n The CLI will attempt to auto-download it on first\n '"'"'shelltime daemon install/reinstall'"'"'.\n\n' "$FILENAME" >&2Or with a heredoc-style redirect (cleaner for multi-line): else
{
echo
echo "WARNING: shelltime-daemon binary was NOT found in $FILENAME."
echo " The CLI will attempt to auto-download it on first"
echo " 'shelltime daemon install/reinstall'."
echo
} >&2This is a style nit — the current approach is perfectly functional. 3. Test coverage gap The manual sad-path test item is unchecked:
This is the only real validation of the new code path. It would be worth checking this off (or noting it was tested) before merging, since Potential Issue —
|
There was a problem hiding this comment.
Code Review
This pull request updates the install.bash script to include a warning message when the shelltime-daemon binary is missing during installation. The feedback suggests refining this warning message to provide a more explicit, actionable command for the user, noting that the automatic installation step might fail if the binary is not yet in the system's PATH.
| echo "" >&2 | ||
| echo "WARNING: shelltime-daemon binary was NOT found in $FILENAME." >&2 | ||
| echo " The CLI will attempt to auto-download it on first" >&2 | ||
| echo " 'shelltime daemon install/reinstall'." >&2 | ||
| echo "" >&2 |
There was a problem hiding this comment.
The warning message is a helpful addition. However, the current wording is somewhat passive. Since the automatic attempt to reinstall the daemon at the end of this script (line 296) will likely fail on fresh installations (because the shelltime binary is not yet in the current shell's PATH and the output is suppressed), providing an explicit, actionable command for the user is more robust. This ensures they know exactly how to resolve the missing daemon issue if the automatic step fails silently.
| echo "" >&2 | |
| echo "WARNING: shelltime-daemon binary was NOT found in $FILENAME." >&2 | |
| echo " The CLI will attempt to auto-download it on first" >&2 | |
| echo " 'shelltime daemon install/reinstall'." >&2 | |
| echo "" >&2 | |
| echo "" >&2 | |
| echo "WARNING: shelltime-daemon binary was NOT found in $FILENAME." >&2 | |
| echo " The CLI will attempt to auto-download it. Please run:" >&2 | |
| echo " $HOME/.shelltime/bin/shelltime daemon install" >&2 | |
| echo "" >&2 |
Summary
Previously the script silently skipped the daemon move when
shelltime-daemonwas absent from the extracted tarball, leaving Linux users without a working daemon and no signal that anything went wrong. This made bugs like the pre-36a09e9.bakrename hard to spot in the wild.Now print a clear stderr warning when the daemon binary is missing, pointing out that the CLI will attempt to auto-download it on first
shelltime daemon install/reinstall.Kept non-fatal because:
EnsureDaemonBinarywhich self-heals on nextshelltime daemon install.shelltimeitself works.Test plan
bash -n install.bash— syntax OKshelltime-daemonfrom the extract, run the script, confirm the WARNING block appears on stderr and the rest of installation completeshttps://claude.ai/code/session_01ThKSJA9sGXQm8jMeCZZdYY
Generated by Claude Code